<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="favicon.ico">
    <link href="__PUBLIC__/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/page.css" rel="stylesheet">
</head>

<style>
input.error{
	border:1px solid red;
}
span.error{
	padding-top:10px;
	color: #f00;
	font-size:12px;
}
</style>

<script>
var tixianUrl = "{:url('shop_txmx/tixian')}";
</script>

<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title"><h5>账户提现</h5></div>
                <div class="col-sm-12 ibox-content">
                    <div class="col-sm-6 form-horizontal">
                        <form method="post" enctype="multipart/form-data" class="form-horizontal" id="form">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">账户总额：</label>
                                <div class="col-sm-6">
                                    <div style="font-size:14px; width:200px; height:35px; line-height:35px;">{$price}&nbsp;元</div>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>

                            <div class="form-group">
                                <label class="col-sm-3 control-label">可提现金额：</label>
                                <div class="col-sm-6">
                                    <div style="font-size:14px; width:200px; height:35px; line-height:35px;">{$price}&nbsp;元</div>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>

                            <div class="form-group">
                                <label class="col-sm-3 control-label">提现金额：</label>
                                <div class="col-sm-6">
                                    <input type="text" name="price" class="form-control">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label"></label>
                                <div class="col-sm-6" style="color: #969696;font-size: 12px;">
                                     提现金额必须大于{$txje}元
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>

                            <div class="form-group">
                                <label class="col-sm-3 control-label">提现密码：</label>
                                <div class="col-sm-6">
                                    <input type="password" name="pay_password" class="form-control">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>

                            <div class="form-group">
                                <div class="col-sm-4 col-sm-offset-2">
                                    <button class="btn btn-primary" type="submit" id="doSubmit">申请提现</button>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="col-sm-6 form-horizontal">
                        <h3>提现银行卡信息</h3>
                        <table class="table table-bordered">
                            <tbody>
                            <tr>
                                <td style="width: 20%;">持卡人姓名</td>
                                <td class="td-con">{$cards.name}</td>
                            </tr>
                            <tr>
                                <td style="width: 20%;">手机号码</td>
                                <td class="td-con">{$cards.telephone}</td>
                            </tr>
                            <tr>
                                <td style="width: 20%;">银行卡账号</td>
                                <td class="td-con">{$cards.card_number}</td>
                            </tr>
                            <tr>
                                <td style="width: 20%;">所属银行</td>
                                <td class="td-con">{$cards.bank_name}</td>
                            </tr>
                            <tr>
                                <td style="width: 20%;">支行</td>
                                <td class="td-con">{$cards.branch_name}</td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>

<!-- 全局js -->
<script src="__PUBLIC__/admin/js/jquery.min.js?v=2.1.4"></script>
<script src="__PUBLIC__/admin/js/plugins/layer/layer.min.js"></script>
<script src="__PUBLIC__/admin/js/plugins/validate/jquery.validate.min.js"></script>	
<script src="__PUBLIC__/admin/js/bootstrap.min.js?v=3.3.6"></script>
<script src="__PUBLIC__/admin/js/common/ajax.js"></script>


<script>
$(function(){
    var icon = "<i class='fa fa-times-circle'></i>&nbsp;&nbsp;";
	$('#form').validate({
    	errorElement : 'span',
    	debug: true,//只验证不提交表单
    	//layer ajax提交表单
        submitHandler:function(){
           // 序列化 表单数据 后提交 ，太简洁了
        	post(tixianUrl,'POST',$('#form').serialize(),1);
            return false;
        },//这是关键的语句，配置这个参数后表单不会自动提交，验证通过之后会去调用的方法
            
    	rules:{
    		price:{required:true},
    		pay_password:{required:true}
    	},
    		
    	messages:{
    		price:{required:icon+'必填'},
    		pay_password:{required:icon+'必填'}
    	}
	});
});

function cl(){
   location.reload();
}	  
</script>
</body>
</html>